<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
  <title>百度地图离线API V2.1  www.xiaoguo123.com</title>
	<style type="text/css">
  body, html,#map_demo, #tab, #mapfrm {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}
  #menu{height:100%;overflow-y:auto}
  td{font-size:14px}
  h4{margin:0;}
  </style>
  <script type="text/javascript" src="../../offlinemap/map_load.js"></script>
  <link rel="stylesheet" type="text/css" href="../../offlinemap/css/map.css"/>
  
  <script type="text/javascript" src="../jquery.js"></script>
  <script type="text/javascript" src="../layer/layer.js"></script>
</head>
<body>
<div id="map_demo"></div>
</body>
<script type="text/javascript">  
	// 百度地图API功能
	var map = new BMap.Map("map_demo");    // 创建Map实例
	map.centerAndZoom(new BMap.Point(116.404, 39.915), 7);  // 初始化地图,设置中心点坐标和地图级别
	map.setCurrentCity("武汉");          // 设置地图中心显示的城市 new！
	map.setMapType(BMAP_HYBRID_MAP); //模式显示卫星地图，卫星地图在tiles_hybird目录下
	
	map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
	map.addControl(new BMap.NavigationControl());   //缩放按钮
	map.addControl(new BMap.MapTypeControl( {mapTypes: [BMAP_NORMAL_MAP,BMAP_HYBRID_MAP]} ));   //添加地图类型控件 离线只支持普通、卫星地图; 三维不支持
	
	//监听地图缩放
    map.addEventListener("zoomend", function(){ 
        if( this.getZoom() > 8 ) {
            // layer.msg("默认只有8级地图, 超过无法显示");
        } 
    });
</script>
</html>
